# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-class-gomor
_pkgname=Class-Gomor
pkgver=1.03
pkgrel=13
pkgdesc='Another class and object builder'
arch=('x86_64' 'aarch64')
license=('PerlArtistic' 'GPL')
depends=('perl')
url='http://search.cpan.org/dist/Class-Gomor'
source=("http://search.cpan.org/CPAN/authors/id/G/GO/GOMOR/$_pkgname-$pkgver.tar.gz")
sha512sums=('b5447df8a8ef5d6c28ffedb6effaf8e2723f347acec244b6251254d1a0651039b7ebb44d7171c3437ae48810342471bd7dbda4b9c3ea2a2030075ef9de106920')

prepare() {
  cd "$_pkgname-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL5LIB="" PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  /usr/bin/perl Makefile.PL
}

build() {
  cd "$_pkgname-$pkgver"

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

